Position specifying method and program

ABSTRACT

The present invention relates to a position specifying method for specifying a position through touch input in a screen displayed on a touch panel display. The position is specified by the steps of acquiring an initial contact position that is a contact position at the start of sensing of a position where contact is made with the touch panel display, displaying a position displaying cursor in a position according to the initial contact position, displaying the position displaying cursor is the position according to the initial contact position during the period for which the contact position sensing continues until the distance from the initial contact position to the contact position reaches a predetermined distance and terminating the display of the position displaying cursor with no position specifying operation performed in a case where the contact position sensing is terminated before the distance from the initial contact position to the contact position reaches the predetermined distance, and displaying the position displaying cursor in such a way that the position displaying cursor follows movement of the contact position after the distance from the initial contact position to the contact position reaches the predetermined distance so that the relative positional relationship between the position displaying cursor and the contact position at the point of time when the distance from the initial contact position to the contact position reaches the predetermined distance is maintained during the period for which the contact position sensing continues and setting, when position-specifying-operation finalizing operation is sensed after the distance from the initial contact position to the contact position reaches the predetermined distance, the position where the position displaying cursor is displayed when the position-specifying-operation finalizing operation is sensed to be a specified position.

CROSS-REFERENCE TO RELATED APPLICATION

This non-provisional application claims priority under 35 U.S.C. §119(a) from Japanese Patent Application No. 2018-003145, filed on Jan.12, 2018, Japanese Patent Application No. 2018-003147, filed on Jan. 12,2018, Japanese Patent Application No. 2018-003148, filed on Jan. 12,2018, Japanese Patent Application No. 2018-003149, filed on Jan. 12,2018, and Japanese Patent Application No. 2018-003151, filed on Jan. 12,2018, the entire contents of which are incorporated herein by reference.

BACKGROUND Technical Field

The present invention relates to a position specifying method forspecifying through touch input a position in a screen displayed on atouch panel display.

Background Art

An image measuring apparatus is used as a measuring apparatus thatmeasures and evaluates the dimensions and shape of a measurement targetobject (hereinafter also referred to as “workpiece”) by using an imageobtained by imaging the workpiece. The image measuring apparatusacquires information on an edge (such as position coordinates of edge)of a measurement target figure contained in the captured image of theworkpiece and evaluates the shape and dimensions of the workpiece basedon the edge information.

In recent years, the spread of a touch panel display has caused what iscalled a touch interface to be widely used as an intuitively easy-to-useuser interface that can be operated, for example, by touching thedisplay, and such a touch interface is also used in an image measuringapparatus (see Japanese Patent Laid-(=open No. 2016-173703, forexample).

A touch interface allows intuitive operation but has a difficulty inaccurately specifying a user's intended position when the user attemptsto specify a position in a fine level in a displayed screen. That is, tospecify a position in the displayed screen with conventional input meansrepresented by a mouse, a mouse or any other input means is used to movea cursor displayed in the screen and position the cursor accurately inan intended position to specify the position. In contrast, in the caseof a touch interface, the center of gravity of a region where a fingeror a tip of a pen is in contact with the display is typically thespecified position. Since the center of gravity of the contact region isbehind the finger or the tip of the pen and therefore invisible to theuser, the user cannot grasp the accurate position specified by the user,and it is therefore not easy to accurately specify the intendedposition.

SUMMARY OF THE INVENTION Problems to be Solved by the Invention

In view of the problem described above, an object of the presentinvention is to provide a position specifying method and a program thatallow a position to be accurately specified through finger touch input.

Means for Solving the Problems

To solve the problem described above, a position specifying methodaccording to the present invention includes the steps of acquiring aninitial contact position that is a contact position at a start ofsensing of a position where contact is made with a touch panel display,displaying a position displaying cursor in a position according to theinitial contact position, displaying the position displaying cursor inthe position according to the initial contact position during a periodfor which the contact position sensing continues until a distance fromthe initial contact position to the contact position reaches apredetermined distance and terminating the display of the positiondisplaying cursor with no position specifying operation performed in acase where the contact position sensing is terminated before thedistance from the initial contact position to the contact positionreaches the predetermined distance, and displaying the positiondisplaying cursor in such a way that the position displaying cursorfollows movement of the contact position after the distance from theinitial contact position to the contact position reaches thepredetermined distance so that a relative positional relationshipbetween the position displaying cursor and the contact position at apoint of time when the distance from the initial contact position to thecontact position reaches the predetermined distance is maintained duringthe period for which the contact position sensing continues and setting,when position-specifying-operation finalizing operation is sensed afterthe distance from the initial contact position to the contact positionreaches the predetermined distance, a position where the positiondisplaying cursor is displayed when the position-specifying-operationfinalizing operation is sensed to be a specified position.

According to the configuration described above, since the positionindicated by the position displaying cursor can be visually recognized,the position can be accurately specified. Further, since no specifiedposition is acquired unless the distance between the contact positionand the initial contact, position reaches the predetermined distance,unnecessary position specifying operation due to unintended contact canbe avoided.

In the present invention, an aspect in which the position displayingcursor is displayed before the distance from the initial contactposition to the contact position reaches the predetermined distance maydiffer from an aspect in which the position displaying cursor isdisplayed after the distance from the initial contact position to thecontact position reaches the predetermined distance. Further in thepresent invention, the position-specifying-operation finalizingoperation may be operation of terminating the contact.

A program according to the present invention causes a computer to carryout any of the position specifying methods described above.

In addition to the above, the present disclosure provides the followingitems:

Item 1

An image measuring apparatus that images a measurement target object anduses an edge detection tool placed by a user in the captured image ofthe measurement target object displayed on a touch panel display tomeasure the dimensions and shape of the measurement target object,

the image measuring apparatus including control means for causing theedge detection tool displayed on the touch panel display to be selectedand editing the edge detection tool in the selected state iscorrespondence with a tool editing gesture that is a gesture for editingthe edge detection tool when the touch panel display is touched in anarbitrary position thereon so that the tool editing gesture is inputtedthereto.

Item 2

The image measuring apparatus according to the item

wherein the tool editing gesture includes pinching-in and pinching-outactions, and

editing corresponding to the pinching-in action is reduction of the edgedetection tool and editing corresponding to the pinching-out action isenlargement of the edge detection tool.

Item 3

The image measuring apparatus according to the item 1 or 2,

wherein the tool editing gesture includes a rotating action, and

editing corresponding to the rotating action is rotation of the edgedetection tool.

Item 4

The image measuring apparatus according to any one of the items 1 to 3,

wherein the tool editing gesture includes a swiping action performed ina two-point simultaneous contact state, and

editing corresponding to the swiping action performed in the two-pointsimultaneous contact state is parallel translation of the edge detectiontool in a swiping direction.

Item 5

The image measuring apparatus according to any one of the items 1 to 4,

wherein the edge detection tool is selected when the edge detection tooldisplayed on the touch panel display touched and a tool selectinggesture that is a gesture for selecting the edge detection tool isinputted.

Item 6

The image measuring apparatus according to the item 5,

wherein the tool selecting gesture is a tapping action.

Item 7

A tool editing method for editing an edge detection tool when ameasurement target object is imaged and the edge detection tool placedby a user in the captured image of the measurement target objectdisplayed on a touch panel display is used to measure dimensions and ashape the measurement target object, the tool editing method carryingout:

a selection step of causing the edge detection tool displayed on thetouch panel display to be selected; and

an editing step of editing the edge detection tool in the selected statein correspondence with a tool editing gesture that is a gesture forediting the edge detection tool when the touch panel display is touchedin an arbitrary position thereon so that the tool editing gesture isinputted thereto.

Item 8

The tool editing method according to the item 7,

wherein the tool editing gesture includes pinching-in and pinching-outactions, and

editing corresponding to the pinching-in action is reduction of the edgedetection tool and editing corresponding to the pinching-out action isenlargement of the edge detection tool.

Item 9

The tool editing method according to the item 7 or 8,

wherein the tool editing gesture includes a rotating action, and

editing corresponding to the rotating action is rotation of the edgedetection tool.

Item 10

The tool editing method according to any one of the items 7 to 9,

wherein the tool editing gesture includes a swiping action performed ina two-point simultaneous contact state, and

editing corresponding to the swiping action performed in the two-pointsimultaneous contact state is parallel translation of the edge detectiontool,

Item 11

The tool editing method according to any one of the items 7 to 10,

wherein the edge detection tool is selected when the edge detection tooldisplayed on the touch panel display is touched and a tool selectinggesture that is a gesture for selecting the edge detection tool isinputted.

Item 12

The tool editing method according to the item 11,

wherein the tool selecting gesture is a tapping action.

Item 13

A program for causing a computer to function as control means in theimage measuring apparatus described in any of the items 1 to 6.

Item 14

An image measuring apparatus that images a measurement target object andmeasures dimensions and a shape of the measurement target object basedon the captured image of the measurement target object displayed on atouch panel display,

the image measuring apparatus including control means for identifying acommand corresponding to a gesture inputted through touching operationperformed on the touch panel display based on a signal outputted fromthe touch panel display in accordance with the gesture and executing thecommand on a portion of the image measuring apparatus that is a portionon which the command is executed,

wherein the gesture is performed in an at-least-two-point simultaneouscontact state.

Item 15

The image measuring apparatus according to the item 14,

wherein the command is a command that causes physical movement/motion ofthe portion of the image measuring apparatus.

Item 16

The image measuring apparatus according to the item 14 or 15,

wherein the gesture performed in the at-least-two-point simultaneouscontact state is a tapping, double tapping, long tapping, flicking,swiping, or rotating action.

Item 17

A program for causing a computer to function as control means in theimage measuring apparatus described in any of the items 14 to 16.

Item 18

An image measuring apparatus that images a measurement target objectplaced on a stage movable in two- or three-dimensional directions andmeasures the dimensions and shape of the measurement target object basedon the captured image of the measurement target object displayed on atouch panel display,

the image measuring apparatus further including control means fordisplaying a button labeled with an identifier for inputting apredetermined command in such a way that the button is superimposed onthe captured image displayed on the touch panel display, furtherdisplaying, when a user performs touch input operation on the portionwhere the identifier is displayed, a menu for selectively inputting anaction mode of the command corresponding to the button on the touchpanel display, assigning, when the user selects any of action modes inthe menu through touch input operation, the selected action mode to thebutton, and executing, when the user performs touch input operation onthe button, the command corresponding to the button in the assignedaction mode.

Item 19

The image measuring apparatus according to the item 18,

wherein the predetermined command is a command that causes the stage tomove in any of the two- or three-dimensional directions,

the button labeled with the identifier is a direction button labeledwith an identifier representing any of the two- or three-dimensionaldirections, and

the action mode includes at least two of fine movement, stepwisemovement, and continuous movement.

Item 20

The image measuring apparatus according to the item 18 or 19, whereinthe control means displays the button when the user performs apredetermined input operation.

Item 21

A program for causing a computer to function as control means in theimage measuring apparatus described in any of the items 18 to 20.

Item 22

An image measuring apparatus including

an imager that acquires an image of a measurement target object,

a touch panel display that displays the image acquired by the imager andaccepts touch input operation of specifying a position in the displayedimage, and

an edge detector that searches for and detects an edge present in apredetermined range around the in-image specified position specified bya user's touch input operation in the image displayed on the touch paneldisplay,

wherein when a plurality of edges are found in a vicinity of thespecified position, the edge detector causes a control object forselecting each of the edges to be displayed on the touch panel displaynot only in an aspect that prevents a wrong edge from being selectedthrough the touch operation but in an aspect that allows visualrecognition of a correspondence between each of the edges and acorresponding control object.

Item 23

The image measuring apparatus according to the item 22, wherein the edgedetector sets the predetermined range, over which an edge is searchedfor, in accordance with a size of a region where the touch panel displaysenses contact resulting from the touch input operation.

Item 24

The image measuring apparatus according to the item 22, furthercomprising second input means that differs from the touch panel displayallowing input operation of specifying a position,

wherein the edge detector, when touch operation performed on the touchpanel display specifies the specified position, searches a wider rangeto detect an edge than in a case where the specified position isspecified by input operation performed on the second input means.

Item 25

An image measuring method comprising the steps of:

displaying an image of a measurement, target object on a touch paneldisplay;

accepting touch input operation of specifying a position in the imagedisplayed on the touch panel display; and

searching for and detecting an edge present in a predetermined rangearound the specified position. specified in the touch operationaccepting step,

wherein when a plurality of edges are found in a vicinity of thespecified position, a control object for selecting each of the edges isdisplayed on the touch panel display not only in an aspect that preventsa wrong edge from being selected through the touch operation but in anaspect that allows visual recognition of a correspondence between eachof the edges and a corresponding control object.

Item 26

A program for detecting an edge of a figure contained in an image of ameasurement target object,

wherein the image measuring program causes a computer to perform theimage measuring method described in the item 25.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of the overall configuration of an imagemeasuring apparatus;

FIG. 2 is a functional block diagram of a computer system;

FIG. 3 shows an example of a displayed screen displayed on a touch paneldisplay;

FIG. 4 is the flowchart of a position specifying process;

FIGS. 5A and 5B diagrammatically show that a user touches a screen(first window HI) with a finger;

FIGS. 6A and 6B diagrammatically show that a contact position CP isslightly moved from an initial contact position P1;

FIG. 7 shows an example of the screen displayed when the distance fromthe initial contact position P1 to the contact position CP reaches apredetermined distance and further shows the user's finger;

FIG. 8 shows an example of the screen displayed when the contactposition CP is further moved from the state shown in FIG. 7 and furthershows the user's finger;

FIG. 9 shows an example of the screen displayed after aposition-specifying-operation finalizing operation is sensed;

FIG. 10 shows an example of a displayed screen in which an edgedetection tool is placed;

FIG. 11 shows an example of selection of the edge detection tool;

FIG. 12 shows an example in which the edge detection tool has beenselected;

FIG. 13 shows an example of editing of the edge detection tool throughgesture input;

FIG. 14 shows an example of the screen displayed on a touch paneldisplay;

FIG. 15 shows an example of two-finger simultaneous contact with thetouch panel display;

FIG. 16 shows an example of a screen displayed on the touch paneldisplay;

FIG. 17 shows another example of the screen displayed on the touch paneldisplay;

FIGS. 18A and 18B show an example of screen. transition in response totouch input operation;

FIG. 19 shows an example of the displayed first window before edgeinformation is acquired;

FIG. 20 is a flowchart of the process of acquiring edge information byusing a one-click tool;

FIG. 21 diagrammatically shows position specifying operation performedon an image of a workpiece displayed in the first window;

FIG. 22 shows an example of the first window displayed when a pluralityof edges have been detected; and

FIG. 23 shows an example of the first window displayed after one edge isselected.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention will be described below withreference to the drawings. In the following description, the samemembers have the same reference character, and a member having beendescribed once will not be described as appropriate.

First Embodiment Configuration of Image Measuring Apparatus

FIG. 1 shows an example of the overall configuration of an imagemeasuring apparatus. An image measuring apparatus 1 includes a stage100, an enclosure 110, and a computer system 140. The stage 100 is sodisposed that the upper surface thereof coincides with a horizontalplane, and a workplace W is placed on the upper surface. The stage 100can be moved in an X-axis direction and a Y-axis direction by motors oroperation of rotating handles 101 and 102. The enclosure 110accommodates an optical system including an illuminator, such as atransmission illuminator and a vertical illuminator, and an imagingdevice, the enclosure 110 itself along with the optical system and theimaging device can he moved in a Z-axis direction by a motor oroperation of rotating a handle 112.

The computer system 140 controls the stage 100 and the enclosure 110 toacquire a captured image of the workpiece W and provide a user with anoperation environment. The computer system 140 includes, for example, acomputer main body 141, a keyboard 142, a mouse 143, and a touch paneldisplay 144. The computer main body 141 controls the actions of thestage 100 and the enclosure 110 based on a circuit (hardware), such as acontrol board, and a program (software) executed by a CPU. The computermain body 141 further acquires and computes information on the workpieceW based on signals outputted from the stage 100 and the enclosure 110and displays the result of the computation on the touch panel display144. The keyboard 142 and the mouse 143 are means for inputtinginformation to the computer main body 141. The touch panel display 144functions as display means for displaying an image outputted from thecomputer main body and further functions as input means for detectingscreen touch operation and inputting information corresponding to theoperation to the computer main body 141.

FIG. 2 is a functional block diagram of the computer system 140. Thefunctional blocks of the computer system 140 include a CPU (centralprocessing unit) 211, an interface 212, an output section 213, an inputsection 214, a primary storage 215, and a secondary storage 216.

The CPU 211 executes a variety of programs to control each portion ofthe image measuring apparatus. The interface 212 is a portionresponsible for input and output of information from and to an externalapparatus, specifically, that is, a portion that captures informationsent from the stage 100 and the enclosure 110 and forwards theinformation to the computer system 140, sends information from thecomputer system 140 to the stage 100 and the enclosure 110, connects thecomputer system 140 to a LAN (local area network) or a WAN (wide areanetwork), and performs other roles.

The output section 213 outputs a result of a process carried out by thecomputer system 140. As the output section 213, for example, the touchpanel display 144 shown in FIG. 1 and a printer are used. The inputsection 214 accepts information from an operator. As the input section214, for example, the keyboard 142, the mouse 143, and the touch paneldisplay 144 shown in FIG. 1 are used. The input section 214 has thefunction of reading information recorded on a recording medium MM. Therecording medium MM stores an image display program and a controlprogram containing sentences that achieve the functions of control meansin the present invention, and the CPU reads and executes the programs toachieve the functions of the control means and other means.

The primary storage 215 is, for example, a RAM (random access memory).Part of the secondary storage 216 may be used as part of the primarystorage 215. The secondary storage 216 is, for example, an HDD (harddisk drive) or an SSD (solid state drive). The secondary storage 216 mayinstead be an external storage device connected to the computer system140 via a network.

Screen Display

A description will next be made of screen display displayed on the touchpanel display 144 by a program (measurement application software)executed by the CPU 211 of the computer main body 141.

FIG. 3 shows an example of the displayed screen. displayed. on the touchpanel display 144 when. the program is executed. A main window MW isdisplayed on the touch panel display 144, as shown in FIG. 3. Aplurality of windows (first window W1 to eighth window W8) are displayedin the main window NW. A menu and icons for a variety of types ofoperation and setting are displayed in an upper portion of the mainwindow MW. In the present embodiment, the eight windows are displayed byway of example, and a window other than the eight windows can bedisplayed as required. The layout of the windows can be freely changedby the user's manipulation.

In the first window (also called workpiece window in some cases) W1, animage WG of the workpiece W captured by the image measuring apparatus 1is displayed. The user, for example, can enlarge/reduce the image WG ofthe workpiece W by performing operation of selecting an icon with themouse 143, and narrowing or widening (what is called pinchingout/pinching in) the gap between the positions where two fingers touchthe display region of the first window W1 on the touch panel display144. The user can further adjust the position of the image WG of theworkpiece W displayed in the first window W1 on the touch panel display144 by performing operation of causing a finger to slide (what is calledswiping) with the finger kept in contact with the display region of thefirst window W1.

In the second window W2, icons of user selectable tools are displayed.The icons of the tools are provided in correspondence with specifyingmethods for specifying a measurement point on the image WG of theworkpiece W.

In the third window W3, icons of user selectable functions aredisplayed. The icons of the functions are provided on a measuring methodbasis. Examples of the measuring method include a method for measuringthe coordinates of one point, a method for measuring the length of astraight line segment, a method for measuring a circle, a method formeasuring an ellipse, a method for measuring a rectangular hole, amethod for measuring an elongated hole, a method for measuringintervals, and a method for measuring intersection of two lines.

In the fourth window W4, guidance showing a measurement operationprocedure and picture patterns corresponding to operation steps aredisplayed.

In the fifth window W5, a variety of sliders are displayed forcontrolling illumination with which the workpiece W is irradiated. Theuser can manipulate any of the sliders to apply desired illumination tothe workpiece W.

In the sixth window W6, the KY coordinates of the stage 100 aredisplayed. The XY coordinate values displayed is the sixth window W6 arethe coordinates of the stage 100 in the X-axis and Y-axis directionswith respect to a predetermined origin.

In the seventh window W7, a tolerance evaluation result is displayed.That is, when a measuring method that allows tolerance evaluation isselected, the result of the evaluation is displayed in the seventhwindow W7.

In the eighth window W8, a measurement result is displayed. That is,when a measuring method in which predetermined computation provides ameasurement result is selected, the result of the measurement isdisplayed in the eighth window W8. The detail of the toleranceevaluation result in the seventh window W7 and the measurement result inthe eighth window 8 are not shown herein.

Position Specifying Process

A description will subsequently be made of a position specifying processachieved by a program executed by the computer system 140. FIG. 4 showsthe flowchart of the position specifying process. The positionspecifying process is initiated in response to the user's touching ofany position in the first window W1. When the process is initiated, thecomputer system 140 keeps acquiring the contact position to recognizesliding operation or releasing operation.

When the process is initiated, the computer system 140 acquires theposition where the user first touches the first window W1 as an initialcontact position (step S100) and displays a position specifying cursorin the initial contact position (step S110).

The computer system 140 subsequently determines whether or not thedistance from the initial contact position to the contact positionreaches a predetermined distance (step S120). In a case where thedistance from the initial contact position to the contact position hasnot reached the predetermined distance (No in step S120), the computersystem 140 evaluates whether or not the contact position can be sensed(that is, whether or not contact has been terminated) (step S180). Thepredetermined distance may be a distance that allows the user to clearlyvisually recognize the initial contact position by moving the finger,the pen, or any other object that is in contact with the initial contactposition by the predetermined distance. For example, the predetermineddistance may be set at about 2 cm. In a case where the contact positioncannot be sensed (Yes in step S180), the computer system 140 hides theposition specifying cursor (step S190) and terminates the process withno specified position acquired. On the other hand, in a case where thecontact position can be sensed in step S180 (No in step S180), thecomputer system 140 returns the process to step S120. The computersystem 140 therefore repeatedly carries out steps S120 and S180 as longas the contact position can be sensed until the distance to the contactposition reaches the predetermined distance.

On the other hand, in a case where the distance from the initial contactposition to the contact position has reached the predetermined distancein step S120 (Yes in step S120), the computer system 140 changes theaspect in which the position specifying cursor is displayed (step S130).Changing the aspect in which the position specifying cursor is displayedallows the user to be notified that the travel from the initial contactposition to the contact position has reached the predetermined distance.As will be described later, after the distance from the initial contactposition to the contact position reaches a predetermined distance, thecomputer system 140 can acquire a specified position when it sensespredetermined position-specifying-operation operation finalizingoperation. The aspect in which the position specifying cursor isdisplayed in the case where the travel from the initial contact positionto the contact position has not reached the predetermined distance iscalled a “non-effective state,” and the aspect in which the positionspecifying cursor is displayed after the travel from the initial contactposition to the contact position reaches the predetermined distance iscalled an “effective state.”

The computer system 140 subsequently moves the position specifyingcursor is such a way that the position specifying cursor follows thecontact position in accordance with further movement of the contactposition being sensed so that the relative position relationship betweenthe position specifying cursor and the contact position at the point oftime when the distance from the initial contact position to the contactposition has reached the predetermined distance is maintained (stepS140).

The computer system 140 subsequently evaluates whether or not theposition-specifying-operation. finalizing operation has been sensed(step S150). The “position-specifying-operation finalizing operation”refers to specific operation of causing the computer system 140 toacquire the position where the position specifying cursor is displayedas the specified position. In the present example, theposition-specifying-operation finalizing operation is contactterminating operation (that is, operation of releasing finger in contactwith screen therefrom). In a case where no position-specifying-operationfinalizing operation has been sensed (No in step S150), the computersystem 140 returns the process to step S140. The computer system 140therefore repeatedly carries out steps S140 and S150 until theposition-specifying-operation finalizing operation is sensed to keepmoving the position specifying cursor in such a way that the positionspecifying cursor follows the contact position. On the other hand, in acase where the position-specifying-operation finalizing operation hasbeen sensed in step S150 (Yes in step S150), the computer system 140acquires as the specified position the position where the positionspecifying cursor is displayed when the position-specifying-operationfinalizing operation is sensed (step S160). The computer system 140 thendisplays a mark representing the specified position in the specifiedposition in the first window W1 (step S170) and terminates the process.

A specific example of the position specifying method according to thepresent embodiment will subsequently be described with reference to anexample of the displayed screen.

FIGS. 5A and 5B diagrammatically show that the user touches the screen(first window W1) with a finger. FIG. 5A shows the screen of the touchpanel display 144 visible to the user when the user touches the screenwith a finger and the hand that operates the screen, and FIG. 5B showsan example of the screen displayed when the user touches the screen withthe finger and further shows an imaginary line representing the touchingfinger. The computer system 140 initiates the position specifyingprocess when the user touches the screen with a finger or a pen. Thecomputer system 140 recognizes the center of gravity of the region wherethe contact has been sensed as an initial contact, position P1 anddisplays a position specifying cursor CS in the initial contact positionP1. In the present example, the position specifying cursor CS is formedof cross hairs that intersect in the initial contact position P1 and acircle around the initial contact position P1. The circle may be sosized as to be visually recognizable also in the state in which thefinger or the pen is in contact with the screen. For example, the circlemay have a diameter of about 3 cm. The thus configured positionspecifying process CS allows the user to visually recognize part of theposition specifying cursor CS even in the state in which the user'sfinger or any other object hides the contact position, and the contactposition sensed by the computer system 140 can be clearly displayed asthe position where the cross hairs intersect each other.

FIGS. 6A and 6B diagrammatically show that a contact position CP isslightly moved from the initial contact position P1. It is noted that,the distance from the initial contact position P1 to the contactposition CP is smaller than the predetermined distance. FIG. 6A showsthe screen of the touch panel display 144 visible to the user and thehand that operates the screen, and FIG. 6B shows an example of thedisplayed screen along with an imaginary line representing the touchingfinger. During the period for which the distance from the initialcontact position P1 to the current contact position CP is smaller thanthe predetermined distance, the computer system 140 keeps displaying theposition specifying cursor CS in the initial contact position P1, asshown in FIGS. 6A and 6B. When the computer system 140 cannot sense thecontact any more (that is, when user releases finger from screen) in thestate shown in FIGS. 5A and 5B or 6A and 6B, the computer system 140hides the position specifying cursor CS and terminates the positionspecifying process (corresponding to step S190 in FIG. 4).

FIG. 7 shows an example of the screen displayed when the distance fromthe initial contact position P1 to the contact position CP reaches thepredetermined distance and further shows the user's finger. The computersystem 140, when it senses that the distance from the initial contactposition P1 to the contact position CP has reached the predetermineddistance, changes the aspect in which the position specifying cursor CSis displayed. The display aspect may be changed in any manner as long asthe user can visually recognize the change in the display aspect beforeand after the change. The change is, however, preferably so made thatthe visibility of the position specifying cursor CS after the change ishigher than the visibility before the change, for example, the circle ofthe position specifying cursor CS after the change is thicker than thecircle before the change.

FIG. 8 shows an example of the screen displayed when the contactposition CP is further moved from the state shown in FIG. 7 and furthershows the user's finger. In FIG. 8, the position specifying cursor inthe state shown in FIG. 7 is drawn with a broken line in the form of animaginary cursor. The computer system 140 moves the position specifyingcursor CS in such a way that the position specifying cursor CS followsthe contact position CP so that the relative position relationshipbetween the position specifying cursor CS and the contact position CP atthe point of time when the distance from the initial contact position P1to the contact position CP has reached the predetermined distance ismaintained, as shown in FIG. 8. That is, in the case where when thedistance from the initial contact position P1 to the contact position CPreaches the predetermined distance, the contact position CP is locatedon the lower right of the initial contact position P1 (that is, positionspecifying cursor CS is displayed on upper left of contact position CP)as shown in FIG. 7, and when the contact position CP is further moved,the position specifying cursor CS is not hidden by the finger or anyother object in contact with the contact position CP but is alwaysdisplayed on the upper left of the contact position CP.

FIG. 9 snows an example of the screen displayed after theposition-specifying-operation finalizing operation (termination ofcontact in present example) is sensed. When the user moves the contactposition CP in such a way that the position specifying cursor CSdisplayed in a desired position and performs theposition-specifying-operation finalizing operation (that is, userreleases finger or any other object from screen), the computer system140, in response to the position-specifying-operation finalizingoperation, acquires as the specified position the position where theposition specifying cursor CS was displayed when theposition-specifying-operation finalizing operation was performed andhides the position specifying cursor CS. The computer system 140 thendisplays a mark M (x mark, for example) representing the specifiedposition in the acquired specified position in the screen and terminatesthe process.

An on-touch-panel-display-position specifying method and a programsuitable for operation performed on the touch panel display 144 can thusbe achieved. In particular, a position can be accurately specifiedthrough touch input performed with a finger or a stylus pen. Further, anunnecessary position specifying process carried out by unintendedcontact can be avoided.

The first embodiment has been described above, but the present inventionis not limited to the example shown in the first embodiment. Forexample, the position specifying method and the program described aboveare not limited to image measuring apparatus applications and are alsoapplicable to a variety of applications involving operation ofspecifying a position in a screen.

In the first embodiment described above, the computer system 140, whenit senses contact, displays the position specifying cursor CS in theinitial contact position P1. The computer system 140 may instead displaythe position specifying cursor CS in a position according to the initialcontact position P1, that is, a position slightly shifted from theinitial contact position P1 in the predetermined direction and by apredetermined distance.

In the first embodiment described above, the description has been madewith reference to the case where part of the position specifying cursorsis drawn with a thin line in the non-effective state, in which thedistance to the position specifying cursor has not reached thepredetermined distance, and the part of the position specifying cursorsis drawn with a thick line in the effective state after the distancereaches the predetermined distance. The change in the aspect in whichthe position specifying cursor is displayed before and after thedistance reaches the predetermined distance is not limited to the changedescribed above. For example, the display aspect may be so changed, forexample, in terms of color that the position specifying cursor isdisplayed in black in the non-effective state and the positionspecifying cursor is displayed in red in the effective state.

In the first embodiment described above, the description has been madeof the case where the position-specifying-operation finalizing operationis the “termination of contact,” but the position-specifying-operationfinalizing operation is not limited thereto. For example, theposition-specifying-operation finalizing operation may instead beoperation of making new contact other than the contact kept by the usersince the first contact to move the position specifying cursor to adesired position. That is, after the position specifying cursor is movedto a desired position through contact with a forefinger, another finger(thumb or middle finger, for example) may be used to touch the screenwith the desired position touched with the forefinger to finalize thespecified position. The computer system 140 may recognize, when itsenses a new contact position, that the position-specifying-operationfinalizing operation has been performed. As another example, an iconcorresponding to a command to finalize the position specifying operationmay be displayed, and the user's operation of touching the icon may bethe position-specifying-operation finalizing operation.

A person skilled in the art may add or delete a component to or from theembodiment described above, may change the design of a component in theconfiguration described above, and may combine the features of theembodiment as appropriate with one another. Such a modified embodimentfalls within the scope of the present invention as long as the modifiedembodiment has the substance of the present invention.

Second Embodiment

A second embodiment relates to an image measuring apparatus, a toolediting method, and a program that edit an edge detection tool throughinput operation performed on a touch panel display.

An image measuring apparatus is used as a measuring apparatus thatmeasures and evaluates the dimensions and shape of a measurement targetobject (workpiece) by using an image produced by imaging the measurementtarget object. The image measuring apparatus acquires information on anedge (such as position coordinates of edge) of a measurement targetfigure contained in the captured image of the measurement target objectand evaluates the shape and dimensions of the measurement target objectbased on the edge information.

The edge information is acquired in many cases by using an edgedetection tool placed through the user's operation in a captured image.The edge detection tool identifies the position where and the range overwhich an edge is scanned in accordance with the shape of a portion of ameasurement target, and edge detection tools having a variety of shapesaccording to the shape of a measurement target object are provided as afunction of the image measuring apparatus. Representative examples ofthe edge detection tool may include a rectangular edge detection toolsuitable for detection of an edge of a straight line portion in an imageand an annular edge detection tool suitable for detection of an edge ina circular portion in an image.

In recent years, the spread of a touch panel display has caused what iscalled a touch interface to be widely used as an intuitively easy-to-useuser interface that can be operated by touching the display, and such atouch interface is also used in an image measuring apparatus. A touchinterface employs gesture-based input. For example, a command isinputted by touching a button with a finger or a touch pen instead ofmouse clicking a button.

In an image measuring apparatus employing a touch panel display, anexample of a method for readily enlarging, reducing, rotating, orotherwise editing an edge detection tool displayed on the touch paneldisplay may include a method for further displaying editing handles, forexample, at the four corners of the edge detection tool and editing theedge detection tool through manipulation of the editing handles with afinger or any other object on the touch panel display. As another methodusing the editing handles, there is a disclosed technology for improvingthe operability for a desired editing handle by drawing the editinghandle along a drawing line not to cause a situation in which theplurality of editing handles crowd or overlap with a captured image sothat the editing operation is hindered (see Japanese Patent Laid-OpenNo. 2016-173703, for example).

An example of a method using no editing handle includes a method thatallows an edge detection tool displayed on a touch panel display to bereduced, enlarged, or otherwise changed by directly performing operationof inputting a gesture, such as pinching in/pinching out actions, on theedge detection tool.

A method using editing handles does not have a simple procedure but hasa difficulty in intuitive operation. In a method for directly inputtinga gesture to an edge detection tool, it is not sometimes easy to performdirect input to an intended edge detection tool, for example, in a casewhere the edge detection tool is much larger or smaller than a size thatallows easy input with a human finger or a case where a plurality ofedge detection tools crowd.

In view of the problems described above, as object of the inventionaccording to the second embodiment is to provide an image measuringapparatus, a tool editing method, and a program that allow intuitive,simple, easy operation of editing an edge detection tool.

The image measuring apparatus according to the second embodiment is animage measuring apparatus that images a measurement target object anduses an edge detection tool placed by the user in the captured image ofthe measurement target object displayed on a touch panel display tomeasure the dimensions and shape of the measurement target object, andthe image measuring apparatus includes control means for causing theedge detection tool displayed on the touch panel display to be selectedand editing the edge detection tool in the selected state incorrespondence with a tool editing gesture that is a gesture for editingthe edge detection tool when the touch panel display is touched in anarbitrary position thereon so that the tool editing gesture is inputtedthereto.

A tool editing method according to the second embodiment is a toolediting method for editing an edge detection tool when a measurementtarget object is imaged and an edge detection tool placed by the user inthe captured image of the measurement target object displayed on thetouch panel display is used to measure the dimensions and shape of themeasurement target object, and the tool editing method carries out aselection step of causing the edge detection tool displayed on the touchpanel display to be selected and an editing step of editing the edgedetection tool in the selected state in correspondence with a toolediting gesture that is a gesture for editing the edge detection toolwhen the touch panel display is touched in an arbitrary position thereonso that the tool editing gesture is inputted thereto.

The tool editing gesture may, for example, be pinching-in andpinching-out actions. The editing corresponding to the pinching-inaction may be reduction of the edge detection tool, and the editingcorresponding to pinching-out action may be enlargement of the edgedetection tool.

The tool editing gesture may instead, for example, be a rotating action,and the editing corresponding to the rotating action may be rotation ofthe edge detection tool.

The tool editing gesture may still instead, for example, be a swipingaction performed in a two-point simultaneous contact state, and theediting corresponding to the swiping action performed in the two-pointsimultaneous contact state may be parallel translation of the edgedetection tool in the swiping direction.

The edge detection tool may be selected when the edge detection tooldisplayed on the touch panel display is touched and a tool selectinggesture that is the gesture for selecting the edge detection tool isinputted. Further, the tool selecting gesture may be a tapping action.

The function of the control means of the image measuring apparatusaccording to the second embodiment may be contained in the form ofsentences in a program, and a computer may execute the program toachieve the function of the control means.

The second embodiment can provide an image measuring apparatus, a toolediting method, and a program that allow intuitive, simple, easyoperation of editing an edge detection tool.

Editing of Edge Detection Tool by Execution of Control Program

The second embodiment is applied to the same image measuring apparatus 1according to the first embodiment, and simple operation of an edgedetection tool is achieved in the displayed screen shown in FIG. 10.FIG. 10 shows a state in which a rectangular edge detection tool Tplaced in advance by the user's input operation is so displayed as to besuperimposed on the captured image WG.

The control program executed by the CPU 211 of the computer main body141 first causes the edge detection tool T displayed on the touch paneldisplay 144 to be selected when the user touches the touch panel display144 to input a tool selecting gesture that is a gesture for selectingthe edge detection tool T to the touch panel display 144 as shown inFIG. 11 and the control program senses a signal outputted from the touchpanel display 144 based on the tool selecting gesture (selection step).

In a case where a plurality of edge detection tools T are placed, theuser selects any one of the edge detection tools T and touches the touchpanel display 144 to input the tool selecting gesture to the selectededge detection tool T to cause the edge detection tool to be selected.The edge detection tool 2 is thus identified as a target to be edited.

The tool selecting gesture may, for example, be an arbitrary gesture,such as tapping, double tapping, or long tapping actions. Further,whether or not the edge detection tool T has been selected is desirablyvisually recognizable based, for example, on an arbitrary expression,such as by changing the color of the edge detection tool andadditionally displaying an editing handle. FIG. 12 shows a case wheresymbols “ ” each representing an editing handle H are additionallydisplayed at the four corners of a rectangular edge detection tool forvisual recognition of the selected edge detection tool.

Further, the control program executed by the CPU 211, when the usertouches an arbitrary position on the touch panel display 144 to input atool editing gesture that is a gesture for editing the edge detectiontool T in the state in which the edge detection tool T has been.selected and the control program detects a signal outputted based on thetool editing gesture from the touch panel display 144, edits the edgedetection tool T in correspondence with the tool editing gesture andreflects the result of the editing in the displayed edge detection toolT on the touch panel display 144 (editing step).

The tool editing gesture may be an arbitrary gesture different from thetool selecting gesture, such as a pinching-in action (operation ofdecreasing distance between two-point contact positions), a pinching-outaction (operation of increasing distance between two-point contactpositions), a rotating action (operation of changing angle of straightline that connects two-point contact positions), and a swiping actionperformed in a two-point simultaneous contact sate (operation of movingcontact positions). It is, however, desirable to employ a gesture thatmatches an aspect in which the edge detection tool T is edited to allowintuitive input. For example, the editing corresponding to thepinching-in action and the editing corresponding to the pinching-outaction are reduction and enlargement, respectively, and the editingcorresponding to the rotating action is rotation. Further, the editingcorresponding to the swiping action performed in a two-pointsimultaneous contact sate is parallel translation in the swipingdirection. The tool editing gesture may also be configured to allowdeletion of the edge detection tool T. The tool editing gesturecorresponding to deletion of the edge detection tool T may, for example,be operation of moving the tool to a point outside the frame of theworkpiece window W1 by using the swiping action performed in a two-pointsimultaneous contact sate, swiping operation performed at a speedgreater than or equal to a predetermined threshold in a two-pointsimultaneous contact sate, or any other operation. FIG. 13 shows a casewhere the pinching-out action is employed to perform lateral enlargementediting on the edge detection tool T.

The position where a tool editing gesture is inputted may not be anarbitrary position on the touch panel display 144 and may be a positionin a particular region in consideration of the position where thecaptured image WG is displayed, the operability of the gesture input,and other factors.

The correspondence between a tool selecting gesture and the state inwhich the tool is selected and the correspondence between a tool editinggesture and the aspect in which the tool is edited may be stored, forexample, in the secondary storage 216 and referred to when the controlprogram is executed or may be contained in the form of sentences in thecontrol program itself.

In the state in which the edge detection tool T is selected, the editingof the edge detection tool T may be allowed only through input of a toolediting gesture or may be allowed also by using an editing handle.

The image measuring apparatus including the control means, the functionof which is achieved by the CPU's execution of the control programcontaining the tool editing method including the selecting step and theediting step described above in the form of sentences, allows intuitivegesture input according to the aspect in which an edge detection tool isedited and further allows editing of the edge detection tool in a smallnumber of actions. Further, editing operation can be reliably performedon a selected edge detection tool irrespective of the size of the edgedetection tools and the degree of crowdedness of edge detection tools.

In the embodiment described above, the edge detection tool T is selectedwhen contact input of a tool selecting gesture is performed on the edgedetection tool T, but, the method for selecting an edge detection toolis not limited thereto. For example, a button for changing which of aplurality of edge detection tools displayed on the touch panel displayis selected may be displayed in the main window MW, and an edgedetection tool T may be selected in accordance with operation performedon the button (tapping action through touch input and clicking actionthrough mouse operation, for example).

Third embodiment

A third embodiment relates to an image measuring apparatus and a programthat allow command to be inputted through touch input via a touch paneldisplay.

An image measuring apparatus is used as a measuring apparatus thatmeasures and evaluates the dimensions and shape of a measurement targetobject (work) by using an image produced by imaging the measurementtarget object. The image measuring apparatus acquires information on anedge (such as position coordinates of edge) of a measurement targetfigure contained in the captured image of the measurement target objectand evaluates the shape and dimensions of the measurement target objectbased on the edge information.

In recent years, the spread of a touch panel display has caused what iscalled a touch interface to be widely used as an intuitively easy-to-useuser interface that can be operated, for example, by touching thedisplay, and such a touch interface is also used in an image measuringapparatus (see Japanese Patent Laid-Open No. 2016-173703, for example).

In the input operation performed on a touch interface, command input, isachieved by using a variety of gestures different from one another interms of the finger action on the touch interface, such as tapping,double tapping, long tapping, flicking, swiping, and rotating actions,and the state of the contact between the finger and the touch interface.The gesture is performed with one finger in many cases.

In the case where a touch interface is employed to input a command to animage measuring apparatus, some commands used in the image measuringapparatus involve physical movement and motion of the apparatus, such asstage movement and focusing, performed when a command is executed. In acase where a gesture performed with one finger is used to input such acommand, the command could be accidentally inputted by unintendedcontact with the touch panel display, and an accident, such as contactbetween a measurement target object and the apparatus, could occur inthe worst case.

In view of the problem described above, an object of the inventionaccording to the third embodiment is to provide an image measuringapparatus and a program that are unlikely to cause malfunction due tounintended contact with the touch panel display.

The image measuring apparatus according to the third embodiment is animage measuring apparatus that images a measurement target object andmeasures the dimensions and shape of the measurement target object basedon the captured image of the measurement target object displayed on thetouch panel display, and it includes control means for identifying acommand corresponding to a gesture inputted through touching operationperformed on the touch panel display based on a signal outputted fromthe touch panel display in accordance with the gesture and executing thecommand on a portion of the image measuring apparatus that is theportion on which the command is executed, and further characterized inthat the gesture is performed in an at-least-two-point simultaneouscontact state.

The command is, for example, a command that causes some type of physicalmovement/motion of the portion of the image measuring apparatus.

The gesture performed in the at-least-two-point simultaneous contactstate is, for example, a tapping, double tapping, long tapping,flicking, swiping, or rotating action.

The function of the control means may be contained in the form ofsentences in a program, and a computer may execute the program toachieve the function of the control means.

The invention according to the third embodiment can provide as imagemeasuring apparatus and a program that are unlikely to cause malfunctiondue to unintended contact with the touch panel display.

Action That Occurs When Gesture is Inputted Through Touching OperationPerformed on Touch Panel Display

The third embodiment is applied to the same image measuring apparatus 1according to the first embodiment, and command input suitable foroperation using a touch panel display is achieved is the displayedscreen shown in FIG. 14. FIG. 14 shows an example of the main window MWdisplayed on the touch panel display 144 by execution of the imagedisplay program. The main window MW displays a plurality of windows asrequired including the workpiece window W1, in which the captured imageWG of the captured workpiece W is displayed. The control programexecuted by the CPU 211 of the computer main body 141 identifies acommand corresponding to a gesture inputted through touching operationperformed on the touch panel display 144 based on a signal outputtedfrom the touch panel display 144 in accordance with the gesture andexecutes the command on a portion of the image measuring apparatus 1that is the portion on which the command is executed, such as the stage100 and the enclosure 110.

The inputted gesture is a gesture so performed that the contact is madewith the touch panel display 144 in at least two points simultaneously(for example, in the case of finger contact, the touch panel display 144is touched with at least two fingers simultaneously). Specific examplesof the gesture may include tapping, double tapping, long tapping,flicking, swiping, and rotating actions, and the gesture may instead beanother gesture performed in an at-least-two-point simultaneous contactstate. FIG. 15 shows an example of the simultaneous two-finger contactwith the touch panel display 144.

A command corresponding to the gesture can be an arbitrary command.Since the requirement of at-least-two-point simultaneous contact reducesthe risk of malfunction due to command input caused by unintendedcontact with the touch panel, the gesture is preferably applied to acommand that requires safety when the command in inputted. For example,examples of such a command include a command that causes physicalmovement/motion of a portion of the image measuring apparatus 1, such asthe stage 100 or the enclosure 110.

Specific examples of assignment of a command to a gesture are asfollows:

-   (1) A motor driving command that causes the stage 100 to move in the    X-axis or Y-axis direction is assigned to an X-axis or    Y-axis-direction swiping action in the at-least-two-point    simultaneous contact state on the captured image WG of the workpiece    W displayed on the touch panel display 144.-   (2) A motor driving command that causes the stage 100 to move in    such a way that the captured image WG is displayed at the center of    the workpiece window W1 assigned to a tapping action in the    at-least-two-point simultaneous contact state on the captured image    WG of the workpiece W displayed on the touch panel display 144.-   (3) A command that causes the optical system in the enclosure 110 to    perform autofocusing is assigned to a double tapping action in the    at-least-two-point simultaneous contact state on the captured image    WG of the workpiece 8 displayed on the touch panel display 144.-   (4) A motor driving command that causes the optical system in the    enclosure 110 to move in the Z-axis direction at low speed is    assigned to a rotating action in the at-least-two-point simultaneous    contact state on the captured image WG of the workpiece W displayed    on the touch panel display 144.

The correspondences between a gesture and a command described above maybe stored, for example, in the secondary storage 216 and referred towhen the control program is executed or may be contained in the form ofsentences in the control program itself.

Fourth Embodiment

A fourth embodiment relates to an image measuring apparatus and aprogram that allow execution of a command through touch operationperformed on a command input button displayed on a touch panel display.

An image measuring apparatus as used as a measuring apparatus thatmeasures and evaluates the dimensions and shape of a measurement targetobject (workpiece) by using an image obtained by imaging the measurementtarget object. The image measuring apparatus acquires information on anedge (such as position coordinates of edge) of a measurement targetfigure contained in the captured image of the measurement target objectand evaluates the shape and dimensions of the measurement target objectbased on the edge information.

In recent years, the spread of a touch panel display has caused what iscalled a touch interface to be widely used as an intuitively easy-to-useuser interface that can be operated, for example, by touching thedisplay, and such a touch interface is also used in an image measuringapparatus (see Japanese Patent Laid-Open No. 2016-173703, for example).A touch interface employs gesture-based input. For example, a command isinputted by touching a button with a finger or a touch pen instead ofmouse clicking a button.

In image measurement, to appropriately image a portion of a measurementtarget object that is the portion a user desires to measure with imagingmeans, the measurement target object is placed on a stage movable intwo- or three-dimensional directions, and the stage is moved to adjustthe position of the measurement target object relative to the imagingmeans. A method for inputting a command that causes the stage to movemay, for example, be a method for displaying buttons for moving thestage in the two-dimensional directions in such a way that the buttonsare superimposed on a captured image of the measurement target objectdisplayed on a display and moving the stage by a predetermined stepwhenever any of the buttons is clicked once (Japanese Patent Laid-OpenNo. 10-197224, for example).

There has been provided, however, no method for readily setting aspecific mode in a case where a user desires to move the stage in avariety of modes, such as fine adjustment and continuous movement,instead of moving the stage by the predetermined step.

In view of the problem described above, an object of the inventionaccording to the fourth embodiment is to provide as image measuringapparatus and a program that allow setting of a command action modethrough touch-input-based easy operation.

The image measuring apparatus according to the fourth embodiment is animage measuring apparatus that images a measurement target object placedon a stage movable is two- or three-dimensional directions and measuresthe dimensions and shape of the measurement target object based on thecaptured image of the measurement target object displayed on a touchpanel display and further includes control means for displaying a buttonlabeled with an identifier for inputting a predetermined command in sucha way that the button is superimposed on the captured image displayed onthe touch panel display, further displaying, when a user performs touchinput operation on the portion where the identifier is displayed, a menufor selectively inputting an action mode of the command corresponding tothe button on the touch panel display, assigning, when the user selectsany of action modes in the menu through touch input operation, theselected action mode to the button, and executing, when the userperforms touch input operation on the button, the command correspondingto the button in the assigned action mode.

The predetermined command may, for example, be a command that causes thestage to move in any of the two- or three-dimensional directions. Thebutton labeled with the identifier may, for example, be a directionbutton labeled with an identifier representing any of the two- orthree-dimensional directions. The action mode may, for example, includeat least two of fine movement, stepwise movement, and continuousmovement.

The control means may be configured to display the button when the userperforms a predetermined input operation.

The function of the control means may be contained in the form ofsentences in a program, and a computer may execute the program toachieve the function of the control means.

The invention according to the fourth embodiment can provide an imagemeasuring apparatus and a program that allow setting of a command actionmode through touch-input-based easy operation.

Screen Display and Action According to Operation

The fourth embodiment is applied to the same image measuring apparatus 1according to the first embodiment, and command input suitable foroperation using a touch panel display is achieved in the displayedscreen shown in FIG. 16. FIG. 16 shows an example of the main window MWdisplayed on the touch panel display 144 by execution of the imagedisplay program. The main window MW displays a plurality of windows asrequired including the workpiece window W1, in which the captured imageWG of the captured workpiece W is displayed. A screen displayed on thetouch panel display 144 when the CPU 211 of the computer main body 141executes the control program will next be described. The followingdescription will illustrate a case where a command that causes the stage100 to move is outputted is response to input operation performed on abutton, and the following description is also applicable to a case wherea command that causes each component of the enclosure 110 to act isoutputted.

The executed control program displays a button BX and a button BY forinputting a motor driving command that causes the stage 100 to move inthe directions ±X and ±Y respectively in the workpiece window W1 in sucha way that the buttons BX and BY are superimposed on the captured imageWG. In the case where the stage 100 is movable also in the direction ±Zwith a motor, a button BZ for inputting a motor driving command thatcauses the stage 100 to move in the directions ±Z is also displayed. Tobe exact, the buttons BX, BY, and BZ are each divided into two buttonsfor inputting commands that cause the stage to move in the positive andnegative directions, as shown in FIG. 16.

The buttons BX, BY, and BZ are each labeled with arm identifierrepresenting the corresponding direction, as shown in FIG. 16. That is,the button BX is labeled with X, the button BY is labeled with Y, andthe button BZ is labeled with Z.

The buttons BX, BY, and BZ may be simultaneously displayed when thecaptured image WG is displayed or may not be initially displayed and maybe displayed in response to some operation inputted by the user. In thiscase, for example, a hamburger-shaped button BH is displayed at the sametime when the captured image WG is displayed, as shown in FIG. 17, andthe buttons BX, BY, and BZ are displayed in response to touch inputoperation performed on the hamburger-shaped button BH, as shown in FIG.16.

When the user performs touch input operation of touching a portion ofthe buttons EX, BY, or BZ that is the portion where the identifier isdisplayed with a finger or a touch pen, the executed control programfurther displays a menu for selectively inputting an action mode of acommand executed when the button labeled with the identifier is touchedand input is made once. For example, when the user touches with a fingerthe portion where Z, which is the identifier with which the button BZ islabeled, is displayed, as shown in FIG. 18A, a menu is displayed forselectively inputting of an action mode in accordance with which thestage 100 is moved in the direction Z when touch input is made once onthe button, as shown in FIG. 18B. FIGS. 18A and 18B show a case whereFine (fine movement), Step (stepwise movement), and Cont (continuousmovement) can be selected and inputted by way of example.

The types of selectable action mode may be the same in all thedirections or may differ from one another on a direction basis.

When the user selects any of the action modes in the menu through touchinput operation, the executed control program assigns the selectedaction mode to the button labeled with the identifier.

Further, when the user performs touch input operation on the button, theexecuted control program executes a command corresponding to the buttonon the stage 100 in the action mode assigned to the button.

A method for canceling the action mode assigned to each of the buttonscan be an arbitrary method.

The image measuring apparatus according to the fourth embodimentdescribed above can readily assign an action mode of a command throughmenu selection to a command input button before the command is inputtedto the command input button and then allows the user to input thecommand in the assigned action mode.

Fifth Embodiment

A fifth embodiment relates to an image measuring apparatus, an imagemeasuring method, and an image measuring program suitable for operationusing a touch panel display.

An image measuring apparatus is used as a measuring apparatus thatmeasures and evaluates the dimensions and shape of a measurement targetobject (workpiece) by using an image obtained by imaging the workpiece.The image measuring apparatus acquires information on an edge (such asposition coordinates of edge) of a measurement target figure containedin the captured image of the workpiece and evaluates the shape anddimensions of the workpiece based on the edge information. In the imagemeasuring apparatus, what is called a “one-click tool” is provided as atool for acquiring edge information through simple operation. Theone-click tool, when the user specifies a position on a displayedscreen, automatically searches an edge location contained in apredetermined range around the specified position to automaticallyacquire edge information. In this process, in a case where a pluralityof edges have been found in the predetermined range under the search,edge information on an edge having the highest intensity is acquired. Amethod including the steps described above has been provided (seeJapanese Patent No. 3,595,014, for example).

In recent years, the spread of a touch panel display has caused what iscalled a touch interface to be widely used as an intuitively easy-to-useuser interface that can be operated, for example, by touching thedisplay.

A touch interface allows intuitive operation but has a difficulty inaccurately specifying a user's intended position when the user attemptsto specify a position in a fine level in a displayed screen. That is, tospecify a position in the displayed screen with conventional input meansrepresented by a mouse, a mouse or any other input means is used to movea cursor displayed in the screen and position the cursor accurately inan intended position to specify the position. In contrast, in the caseof a touch interface, the center of gravity of a region where a fingeror a tip of a pen is in contact with the display is typically thespecified position. Since the center of gravity of the contact region isbehind the finger or the tip of the pen and therefore invisible to theuser, the user cannot grasp the accurate position specified by the user,and it is therefore not easy to accurately specify the intendedposition.

It is conceivable that applying such a touch interface to operate animage measuring apparatus and using as input means for inputtingoperation to the one-click tool frequently cause a case where thepredetermined range over which the search is performed by the one-clicktool does not contain an intended edge. To allow the search range to belikely to contain the intended edge, a measure is taken to widen theone-click-tool search range as compared with the search range in relatedart. In this case, a plurality of edges is more likely to be found inthe search range. In a case where a higher intensity edge is present inthe vicinity of the edge intended by the user, the automatic edgeidentification based on the edge intensity undesirably prevents theone-click tool from acquiring edge information on the edge intended bythe user.

In view of the problem described above, an object of the inventionaccording to the fifth embodiment is to provide an image measuringapparatus, an image measuring method, and an image measuring programsuitable for operation using a touch panel display.

To solve the problem described above, the image measuring apparatusaccording to the fifth embodiment includes an imager that acquires animage of a measurement target object, a touch panel display thatdisplays the image acquired by the imager and accepts touch inputoperation of specifying a position in the displayed image, and an edgedetector that searches for and detects an edge present in apredetermined range around the in-image specified position specified bya user's touch input operation in the image displayed on the touch paneldisplay. The edge detector is characterized in that when a plurality ofedges are found in the vicinity of the specified position, a controlobject for selecting each of the edges is displayed on the touch paneldisplay not only in an aspect that prevents a wrong edge from beingselected through the touch operation but in an aspect that allows visualrecognition of the correspondence between each of the edges and thecorresponding control object.

In the fifth embodiment, the edge detector may set the predeterminedrange, over which an edge is searched for, in accordance with the sizeof the region where the touch panel display senses contact resultingfrom the touch input operation.

Further, in the fifth embodiment, the image measuring apparatus mayfurther include second input means that differs from the touch paneldisplay allowing input operation of specifying a position, and the edgedetector, when touch operation performed on the touch panel displayspecifies the specified position, may search a wider range to detect anedge than in the case where the specified position is specified by inputoperation performed on the second input means.

To solve the problem described above, an image measuring methodaccording to the fifth embodiment includes the steps of displaying animage of a measurement target object on a touch panel display, acceptingtouch input operation of specifying a position in the image displayed onthe touch panel display, and searching for and detecting an edge presentin a predetermined range around the specified position specified in thetouch operation accepting step. The image measuring method ischaracterized in that when a plurality of edges are found in thevicinity of the specified position, a control object for selecting eachof the edges is displayed on the touch panel display not only in anaspect that prevents a wrong edge from being selected through the touchoperation but in an aspect that allows visual recognition of thecorrespondence between each of the edges and the corresponding controlobject.

To solve the problem described above, an image measuring programaccording to the fifth embodiment is a program for detecting an edge ofa figure contained in an image of a measurement target object and ischaracterized in that the image measuring program causes a computer toperform the image measuring method described above.

Flowchart of Processes Carried Out, by One-Click Tool

The fifth embodiment is applied to the same image measuring apparatus 1according to the first embodiment and achieves edge detection suitablefor operation using a touch panel display in the displayed screen shownin FIG. 3. The procedure of a method for acquiring edge information willbe described based on a “one-click tool” capable of acquiring, throughsingle position specifying operation, information on an edge (such asposition coordinates of edge) of a measurement target figure containedin the image WG of the workpiece W displayed in the first window W1. Themethod is achieved by a program executed by the computer system 140.FIG. 19 shows an example of the displayed first window W1 before edgeinformation is acquired. In the example shown in FIG. 19, threeinclining oblong figures are displayed in the first window W1. The sixlong sides of the oblongs are called edges E1 to E6, respectively. Inthe following description, a procedure of acquiring edge information onthe straight line E2 out of the edges E1 to E6 by using the one-clicktool will be described.

FIG. 20 is a flowchart of the process of acquiring the edge informationby using the one-click tool.

The process of acquiring the edge information by using the one-clicktool is initiated when the user taps the icon of a straight linemeasuring method (length of straight line, for example) as a function inthe third window W3 in FIG. 3 to specify the measuring method andfurther taps the icon of the one-click tool in the second window W2 inFIG. 3 to select the one-click tool as the method for specifying ameasurement point.

When the process is initiated, the computer system 140 waits for theuser's operation of specifying a position in the first window W1 (stepS200). To specify an edge from which the user desires to acquire edgeinformation, the user subsequently taps a point in the vicinity of thedesired edge, as shown in FIG. 21. In the present example, the user tapsa point in the vicinity of the edge E2 (step S210). At this point, thetouch panel display 144 recognizes a position P shifted from the edge E2as the specified position in some cases although the user intended totap a point on the edge E2, and it is assumed in the present examplethat the specified position P is shifted from the edge P2. The computersystem 140 subsequently searches a predetermined range around theposition P specified by the tapping (step S220) to find candidates ofthe edge (step S230). The predetermined range L over which the search isperformed may be a region having a size roughly equal to the size of acontacting finger (diameter of about 1 cm, for example).

A method for searching the predetermined range L to acquire edgecandidates in steps S220 to S230 can be achieved, for example, asfollows: First, a two-dimensional differential filter is applied to aposition around the position P radially within the predetermined range Lon a predetermined angle basis to determine a value representing thedegree of change in density (brightness) of a pixel in the positionwhere the distance from the position P falls within the predeterminedrange L, and a position where the value is greater than a predeterminedvalue is recognized as an edge candidate position. What is called a boxtool can then be applied to each of the recognized edge candidatepositions to acquire a straight-line edge formed of many points aroundthe edge candidate position to acquire a plurality of straight-line edgecandidates around the position P specified by the user.

In a case where an edge candidate is found in the predetermined range L(Yes in step S230), the computer system 140 relates a control object(such as button for accepting operation performed on touch panel display144 or performed with mouse 143) to the found edge candidate anddisplays the control object on the touch panel display 144. In a casewhere a plurality of edge candidates are found, a plurality of controlobjects are displayed. In this case, the computer system 140 displaysthe plurality of control objects not only in an aspect that prevents awrong control object from being selected through touch operationperformed on the touch panel display 144 but in an aspect that allowsvisual recognition of the correspondence between the edges and thecontrol objects (step S240). In the present example, not only the edgeE2, which the user desires to acquire, but the edges E1 and E3 are foundin the predetermined range L around the position P, as shown in FIG. 21.The computer system 140 then displays buttons B1 to B3 in correspondencewith the edges E1 to E3. At this point, the buttons B1 to B3 are sodisplayed as to be separate from one another by about 1 cm so that awrong button is not selected through touch operation. The computersystem 140 further displays a straight line that connects one point oneach of the edges E1 to E3 to the corresponding one of the buttons B1 toB3 on the touch panel display 144 so that the correspondence between theedges and the control objects is visually recognizable. The computersystem 140 further displays imaginary lines L1 to L3, which aresuperimposed on the edge candidates, on the touch panel display 144, asshown in FIG. 22. Displaying the imaginary lines in such a way that theyare superimposed on the edge candidates allows the user to readilyvisually recognize the edges that are found edge candidates.

The user subsequently taps the control object corresponding to the edgefrom which the user desires to acquire edge information. In the state inwhich the buttons B1 to B3 are displayed in relation to the edges E1 toE3 as shown in FIG. 22, when the user taps the button B2 correspondingto the edge E2 (step S250), the computer system 140 acquires edgeinformation (such as position coordinates) on the edge corresponding tothe selected control object, displays the edge information in such a waythat the edge information is superimposed on the image WG of theworkpiece N (step S260), and terminates the process. In the presentexample, edge information on the edge E2 corresponding to the button B2tapped by the user is acquired, and the acquired edge information(coordinates of edge) is so displayed as to be superimposed on the imageWG of the workpiece W, as shown in FIG. 23.

On the other hand, in a case where no edge candidate is found in thepredetermined range L (No in step S230), an error message stating thatno edge has been detected is displayed (step S270), and the process isterminated.

The process flowchart described above allows edge informationacquisition using the one-click tool suitable for operation performed onthe touch panel display 144. In particular, a desired edge can bereadily selected by using the one-click tool on the touch panel display144 even at a location where edges crowd.

The present embodiment has been described above, but the presentinvention is not limited thereto. For example, the above embodiment hasbeen described with reference to the case where a line connects acontrol object and an imaginary line of an edge to each other to displaythe correspondence therebetween in a visually recognizable manner, but amethod for displaying the correspondence between an edge and a controlobject in a visually recognizable manner is not limited to the lineconnection. For example, each set of an imaginary line and thecorresponding control object may be displayed in a color different fromthe colors of the other sets so that the correspondence between theimaginary line and the corresponding control object is recognized, oreach of the sets of a control object and the imaginary line of thecorresponding edge may be sequentially caused, for example, to blink insynchronization with each other for visual recognition of thecorrespondence between the imaginary line of the edge and the controlobject.

The above embodiment has been further described with reference to thecase where a plurality of control objects are so displayed as to beseparate from one another so that the control objects are displayed inan aspect that prevents a wrong control object from being selectedthrough touch operation, but the aspect that prevents a wrong one of theplurality of control objects from being selected through touch operationis not limited to the aspect described above. For example, the buttondisplayed as each of the control objects is so sized as to be largeenough not to cause wrong selection through touch operation(quadrangular shape having each side greater than or equal to about 1cm, for example), whereby selection of a wrong control object throughtouch operation can be avoided even in a case where the buttons arearranged at narrow intervals (or buttons are arranged with no gap).

The above embodiment has been described with reference to the case wherea straight-line edge is detected by using the one-click tool. An edge tobe extracted may instead have a shape other than that of a straight line(circular or elliptical shape, for example). A method for extractingedges of a variety of shapes can be achieved by applying an existingapproach as appropriate.

The above embodiment has been described with reference to the case wherean error message is displayed and the process is terminated when no edgeis found in the predetermined range L over which the search isperformed. Instead, when no edge is found in the search range, thesearch range may be increased, and the process may be continued until anedge candidate is found.

In the embodiment described above, the predetermined range L over whichthe search is performed is a fixed range. The predetermined range L mayinstead be a variable range. For example, the predetermined range L maybe changed in accordance with the size (such as area, perimeter, andmaximum diameter) of a region where the user has touched the touch paneldisplay 144. Since the amount of shift of position specifying operationis believed to fail within the range where the contact is made, theconfiguration described above prevents an excessively wide search rangebut allows an appropriate edge candidate to be presented with theprocessing speed increased.

In the embodiment described above, edge search position in the firstwindow W1 is specified through touch operation performed on the touchpanel display 144. The edge search position may, of course, instead bespecified by using input means other than a touch panel display, such asa mouse operation. In this case, the search range may be changed throughmouse operation and tapping operation with a finger or pen. Input meansother than a touch panel display, such as a mouse, allows the user toaccurately specify an intended position as compared with the tappingoperation. In the case where a position is specified by input meansother than a touch panel display, the predetermined range L over whichthe search is performed may therefore be narrowed as compared with thecase using the tapping operation. appropriate search range can thus beachieved is accordance with the position specifying method, whereby anappropriate edge candidate can be presented with the processing speedincreased.

In the embodiment described above, an edge candidate and a controlobject are so displayed that the correspondence therebetween is visuallyrecognizable irrespective of the number of found edge candidates.Instead, when only one edge candidate is found, it is assumed that theuser has specified the found edge candidate, and edge information may beacquired with no control object displayed (that is, step S240 skipped).

1-5. (canceled)
 6. An image measuring apparatus that images ameasurement target object and measures dimensions and a shape of themeasurement target object based on the captured image of the measurementtarget object displayed on a touch panel display, the image measuringapparatus including control means for identifying a commandcorresponding to a gesture inputted through touching operation performedon the touch panel display based on a signal outputted from the touchpanel display in accordance with the gesture and executing the commandon a portion of the image measuring apparatus that is a portion on whichthe command is executed, wherein the gesture is performed in anat-least-two-point simultaneous contact state.
 7. The image measuringapparatus according to claim 6, wherein the command is a command thatcauses physical movement/motion of the portion of the image measuringapparatus.
 8. The image measuring apparatus according to claim 6,wherein the gesture performed in the at-least-two-point simultaneouscontact state is a tapping, double tapping, long tapping, flicking,swiping, or rotating action.
 9. A program for causing a computer tofunction as control means in the image measuring apparatus described inclaim 6.